version: '3'
services:
  app:
    container_name: kvd_app
    ports:
      - "8081:8080"
    build:
      context: ./containers/app
    volumes:
      - './app:/var/www/'

  nginx:
    container_name: kvd_nginx
    image: nginx:latest
    ports:
      - "80:80"
    volumes:
      - './app:/var/www/'
      - './containers/nginx/conf.d:/etc/nginx/conf.d'

  mysql:
    container_name: kvd_mysql
    image: mysql:8
    ports:
      - "3306:3306"
    environment:
      - MYSQL_ROOT_PASSWORD=root
    volumes:
      - './containers/mysql:/var/lib/mysql'